import request from '@/utils/request'
/**
 *  获取权限组的列表
 * **/
export function permissionGroup(params) {
    return request({
        url: '/permissions',
        method: 'get',
        params
    })
}
/**
 *  获取权限组的简单列表
 * **/
export function simplePermissionGroup() {
    return request({
        url: '/permissions/simple'
    })
}

/**
 * 权限组详情
 *
 * ***/
export function permissionGroupDetails(id) {
    return request({
        url: `/permissions/${id}`,
        method: 'get'
    })
}

/**
 * 权限组添加
 *
 * ***/
export function permissionGroupAdd(data) {
    return request({
        url: '/permissions',
        method: 'post',
        data
    })
}

/**
 * 权限组修改
 *
 * ***/
export function permissionGroupModification(data) {
    return request({
        url: `/permissions/${data.id}`,
        method: 'PUT',
        data
    })
}

/**
 * 权限组删除
 * ****/

export function permissionGroupDeletion(id) {
    return request({
        url: `/permissions/${id}`,
        method: 'delete'
    })
}